--[[

        type_manage.lua
        exported by excel2lua.py
        from file:type_manage.xlsx

--]]

local _data = {
  [1] = {id = 1,name = 'items',},
  [2] = {id = 2,name = 'equipment',},
  [3] = {id = 3,name = 'magickey',},
  [4] = {id = 4,name = 'gemstone',},
  [5] = {id = 5,name = 'resource',},
  [6] = {id = 6,name = 'hero',},
}

local id_to_index={
   [1] = 1,
   [2] = 2,
   [3] = 3,
   [4] = 4,
   [5] = 5,
   [6] = 6,
}

local type_manage={}

function type_manage.length() 
   return #_data 
end 

function type_manage.indexOf(index) 
   return _data[index] 
end 

function type_manage.get(id) 
  return type_manage.indexOf(id_to_index[id])
end 

return type_manage